require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 3,["5"] = 3,["6"] = 3,["7"] = 5,["8"] = 7,["9"] = 8,["10"] = 11,["11"] = 13,["12"] = 7,["13"] = 16,["14"] = 17,["15"] = 17,["16"] = 17,["17"] = 18,["18"] = 19,["19"] = 19,["20"] = 20,["21"] = 20,["22"] = 19,["24"] = 19,["25"] = 22,["27"] = 23,["31"] = 26,["32"] = 16});
local ____exports = {}
local ____context = require("solar.w3ts.tsx.basic_pragma.hooks.context")
local hookContext = ____context.hookContext
local hookMap = ____context.hookMap
require("solar.w3ts.tsx.basic_pragma.hooks.reconcilerHooks")
local function initializeRef(initial)
    local state = {type = "ref", current = initial}
    __TS__ObjectDefineProperty(state, "type", {enumerable = false, value = "ref"})
    return state
end
____exports.useRef = function(initial)
    local ____hookContext_currentIndex_0 = hookContext.currentIndex
    hookContext.currentIndex = ____hookContext_currentIndex_0 + 1
    local index = ____hookContext_currentIndex_0
    local hooks = hookMap:get(hookContext.currentInstance)
    local ____hooks_index_2 = hooks[index + 1]
    if ____hooks_index_2 == nil then
        local ____initializeRef_result_1 = initializeRef(initial)
        hooks[index + 1] = ____initializeRef_result_1
        ____hooks_index_2 = ____initializeRef_result_1
    end
    local state = ____hooks_index_2
    if state.type ~= "ref" then
        error(
            (("Expected a ref hook at index " .. tostring(index)) .. ", got ") .. state.type,
            0
        )
    end
    return state
end
return ____exports
